package com.lwl.blog.service.impl;

import com.lwl.blog.core.dao.IBaseDao;
import com.lwl.blog.core.service.BaseServiceImpl;
import com.lwl.blog.dao.SystemUserDao;
import com.lwl.blog.dao.impl.SystemUserDaoImpl;
import com.lwl.blog.entity.SystemUser;
import com.lwl.blog.service.ISystemUserService;
import com.lwl.blog.utils.MyBatisUtils;
import com.lwl.blog.utils.SqlSessionThreadLocal;
import org.apache.ibatis.session.SqlSession;

public class SystemUserServiceImpl extends BaseServiceImpl<SystemUser> implements ISystemUserService {

    private  SystemUserDao systemUserDao=new SystemUserDaoImpl();

    @Override
    protected IBaseDao<SystemUser> getBaseDao() {
        //从threadlocal中获取localsession对象，创建mapper
        SqlSession sqlSession= SqlSessionThreadLocal.get();
        return sqlSession.getMapper(SystemUserDao.class);
    }
}
